Exists application command
An Exists command is a request to determine whether the object specified by a reference exists.SYNTAX
referenceToObject exists exists referenceToObjectPARAMETER
- referenceToObject
- A reference to the object or objects to find.
Class: ReferenceRESULT
Iftrue
, all of the objects referred to by referenceToObject exist. Iffalse
, one or more of the objects referred to by referenceToObject do not exist.
Class: BooleanEXAMPLES
tell document "Tremendous" of app "Scriptable Text Editor" if word 7 exists then delete word 7 end if end tell tell application "Scriptable Text Editor" if exists front document then print front document end if end tell